
<template>
  <FormItemWraaper v-bind="$attrs" :selectedWidget="selectedWidget" :editorProps="editorProps">
    <Input 
      v-model:value="state" 
      :placeholder="editorProps.placeholder || '请输入'"
    />
  </FormItemWraaper>
</template>
<script lang="ts" name="input-editor" setup>
import { ref, watch, onMounted, PropType } from 'vue';
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
import { useI18n } from '/@/hooks/web/useI18n';
import FormItemWraaper from './PropFormItemWrapper.vue'
import { Input } from 'ant-design-vue';
import type { Designer } from '../../type'
const { t } = useI18n('diyForm')

const props = defineProps({
  value: { type: [String, Number] },
  editorProps: { type: Object, default: () => {}},
  selectedWidget: Object,
  designer: { type: Object as () => Designer}
})

const emit = defineEmits(['update:value']);
const [state] = useRuleFormItem(props, 'value', 'update:value');
watch(
  () => state.value,
  (val : any) => {
    
  }, 
  {
    immediate: true
  }
)
onMounted(() => {

})

</script>

<style lang="less">

</style>
